Skip to content

docs: add deployed-contracts.md registry and link it in documentation…#1047

Open
K1NGD4VID wants to merge 9 commits into
LabsCrypt:mainfrom
K1NGD4VID:deployed-contract-address
Open

docs: add deployed-contracts.md registry and link it in documentation…#1047
K1NGD4VID wants to merge 9 commits into
LabsCrypt:mainfrom
K1NGD4VID:deployed-contract-address

Conversation

@K1NGD4VID
Copy link
Copy Markdown
Contributor

closes #958

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, the docs/deployed-contracts.md addition itself looks fine and closes the doc gap, but this PR has serious scope problems that block merging:

  1. Security smell in production middleware. backend/src/middleware/jwtAuth.ts adds an if (process.env.NODE_ENV === "test") block that accepts hardcoded test-token / test-admin-token strings as authenticated users. backend/src/controllers/loanController.ts does the same for test-* user prefixes. NODE_ENV branches inside production code paths are a footgun — a misconfigured deploy or a downstream consumer setting NODE_ENV=test reopens the backdoor. Test-only behavior should live in test fixtures/mocks, not in shipped middleware.

  2. Scope creep. The PR title is "docs: add deployed-contracts.md" but it touches 10 files including app.ts (adds backwards-compat root mounts), loanController, jwtAuth, loanAccess, notificationService, webhookService, and frontend/utils/amount.ts. Those changes need their own scoped PRs.

To unblock: please split this into:

  • one PR with only docs/deployed-contracts.md + the README/CONTRIBUTING links pointing to it (closes #958)
  • separate PRs (if the changes are actually needed) for the app mounts, the controller refactors, and the amount.ts update — none with NODE_ENV backdoors

happy to review the doc-only PR fast once it's split out.

@K1NGD4VID
Copy link
Copy Markdown
Contributor Author

K1NGD4VID commented Jun 2, 2026

fixed, please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Add a deployed contract address registry doc per network

2 participants